#!/bin/bash
read -p "Are you sure you want to clean the devops [YES/NO]:" accept

## onley devops
#if [ "$accept" == "YES" ]; then
#    echo 'cleaning...'
#    docker ps | grep "devops-" | awk '{print $1}' | xargs docker stop
#    docker ps -a | grep "devops-" | awk '{print $1}' | xargs docker rm
#    echo 'cleaned'
#fi

## ALL
if [ "$accept" == "YES" ]; then
    echo 'removing...'
    docker stop $(docker ps -a | grep devops | awk '{print $1}')
    docker rm $(docker ps -a | grep devops | awk '{print $1}')
    echo 'successfully'
fi

